import Vue from 'vue';
import VueRouter from 'vue-router';
import Login from '@/pages/Login.vue';

Vue.use(VueRouter);

const originalPush = VueRouter.prototype.push;
// @ts-ignore
VueRouter.prototype.push = function push (location, onResolve, onReject) {
  if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject);
  // @ts-ignore
  return originalPush.call(this, location).catch(err => err)
}

const routes = [
  {
    path: '/',
    name: 'login',
    component: Login
  },
  {
    path: '/passLogin/:examId/:useType/:paperType',
    name: 'passLogin',
    props: true,
    component: () => import('@/pages/passLogin.vue')
  },
  {
    path: '/private',
    name: 'private',
    props: true,
    component: () => import('@/pages/Private.vue')
  },
  {
    path: '/wordLogin/:examId',
    name: 'wordLogin',
    props: true,
    component: () => import('@/components/word-login/index.vue')
  },
  // 教师
  {
    path: '/teacher',
    name: 'teacher',
    component: () => import('@/pages/Menu.vue'),
    redirect: { name: 'baseInfo' },
    props: true,
    children: [
      {
        path: 'examList',
        name: 'examList',
        props: true,
        component: () => import('@/components/exam/exam-list/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
          ]
        }
      },
      {
        path: 'examManagement/:batchid',
        name: 'examManagement',
        props: true,
        component: () => import('@/components/exam/exam-manage/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
          ]
        }
      },
      {
        path: 'editExamOne/:batchid/:examid',
        name: 'editExamOne',
        props: true,
        component: () => import('@/components/exam/add-exam1/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'editExamOne',path:'/teacher/editExamOne/:batchid/:examid'},
          ]
        }
      },
      {
        path: 'editExamTwo/:batchid/:examid',
        name: 'editExamTwo',
        props: true,
        component: () => import('@/components/exam/add-exam2/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'editExamTwo',path:'/teacher/editExamTwo/:batchid/:examid'},
          ]
        }
      },
      {
        path: 'addExamOne/:batchid',
        name: 'addExamOne',
        props: true,
        component: () => import('@/components/exam/add-exam1/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'addExamOne',path:'/teacher/addExamOne/:batchid'},
          ]
        }
      },
      {
        path: 'addExamTwo/:batchid',
        name: 'addExamTwo',
        props: true,
        component: () => import('@/components/exam/add-exam2/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'addExamTwo',path:'/teacher/addExamTwo/:batchid'},
          ]
        }
      },
      {
        path: 'examMonitorStuOne/:batchid/:examid/:teacherid/:examType', //监考学生
        name: 'examMonitorStuOne',
        props: true,
        component: () => import('@/components/exam/examMonitor-student/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'editExamOne',path:'/teacher/editExamOne/:batchid/:examid'},
            {name:'examMonitorStuOne',path:'/teacher/examMonitorStuOne/:batchid/:examid/:teacherid/:examType'},
          ]
        }
      },
      {
        path: 'studentExamDetail4/:batchid/:examid/:stuid/:type',
        name: 'studentExamDetail4',
        props: true,
        component: () => import('@/components/exam/student-exam/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'editExamOne',path:'/teacher/editExamOne/:batchid/:examid'},
            {name:'studentExamDetail4',path:'/teacher/studentExamDetail4/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'stuWordHtml4/:batchid/:examid/:stuid/:type',
        name: 'stuWordHtml4',
        props: true,
        component: () => import('@/components/stuWordHtml/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'editExamOne',path:'/teacher/editExamOne/:batchid/:examid'},
            {name:'studentExamDetail4',path:'/teacher/studentExamDetail4/:batchid/:examid/:stuid/:type'},
            {name:'stuWordHtml4',path:'/teacher/stuWordHtml4/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'studentManage/:batchid/:examid/:paperType',
        name: 'studentManage',
        props: true,
        component: () => import('@/components/exam/student-manage/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'studentManage',path:'/teacher/studentManage/:batchid/:examid/:paperType'},
          ]
        }
      },
      {
        path: 'studentExamDetail/:batchid/:examid/:paperType/:stuid/:type',
        name: 'studentExamDetail',
        props: true,
        component: () => import('@/components/exam/student-exam/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'studentManage',path:'/teacher/studentManage/:batchid/:examid/:paperType'},
            {name:'studentExamDetail',path:'/teacher/studentExamDetail/:batchid/:examid/:paperType/:stuid/:type'},
          ]
        },
      },
      {
        path: 'stuWordHtml/:batchid/:examid/:stuid/:type',
        name: 'stuWordHtml',
        props: true,
        component: () => import('@/components/stuWordHtml/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'studentManage',path:'/teacher/studentManage/:batchid/:examid/:paperType'},
            {name:'studentExamDetail',path:'/teacher/studentExamDetail/:batchid/:examid/:paperType/:stuid/:type'},
            {name:'stuWordHtml',path:'/teacher/stuWordHtml/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'reviewPaper/:batchid/:examid',
        name: 'reviewPaper',
        props: true,
        component: () => import('@/components/exam/review-paper/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'reviewPaper',path:'/teacher/reviewPaper/:batchid/:examid'},
          ]
        },
      },
      {
        path: 'examWord/:batchid/:examid/:structId',
        name: 'examWord',
        props: true,
        component: () => import('@/components/html-word/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'reviewPaper',path:'/teacher/reviewPaper/:batchid/:examid'},
            {name:'examWord',path:'/teacher/examWord/:batchid/:examid/:structId'},
          ]
        },
      },
      {
        path: 'proctorManage/:batchid/:examid/:paperType',
        name: 'proctorManage',
        props: true,
        component: () => import('@/components/exam/proctor-manage/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'proctorManage',path:'/teacher/proctorManage/:batchid/:examid'},
          ]
        },
      },
      {
        path: 'examreport/:batchid/:examid/:paperType',
        name: 'examreport',
        props: true,
        component: () => import('@/components/exam/exam-report/index.vue'),
        meta:{noMenu:true},
      },
      {
        path: 'examAnalysis/:batchid/:examid',
        name: 'examAnalysis',
        props: true,
        component: () => import('@/components/exam/exam-analysis/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'examAnalysis',path:'/teacher/examAnalysis/:batchid/:examid'},
          ]
        }
      },
      {
        path: 'dataAnalysis/:batchid/:examid',
        name: 'dataAnalysis',
        props: true,
        component: () => import('@/components/exam/exam-analysis/dataAnalysis.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'examAnalysis',path:'/teacher/examAnalysis/:batchid/:examid'},
            {name:'dataAnalysis',path:'/teacher/dataAnalysis/:batchid/:examid'},
          ]
        }
      },
      {
        path: 'studentExamDetailOne/:batchid/:examid/:stuid/:type',
        name: 'studentExamDetailOne',
        props: true,
        component: () => import('@/components/exam/student-exam/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'examAnalysis',path:'/teacher/examAnalysis/:batchid/:examid'},
            {name:'dataAnalysis',path:'/teacher/dataAnalysis/:batchid/:examid'},
            {name:'studentExamDetailOne',path:'/teacher/studentExamDetailOne/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'stuWordHtmlOne/:batchid/:examid/:stuid/:type',
        name: 'stuWordHtmlOne',
        props: true,
        component: () => import('@/components/stuWordHtml/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'examAnalysis',path:'/teacher/examAnalysis/:batchid/:examid'},
            {name:'dataAnalysis',path:'/teacher/dataAnalysis/:batchid/:examid'},
            {name:'studentExamDetailOne',path:'/teacher/studentExamDetailOne/:batchid/:examid/:stuid/:type'},
            {name:'stuWordHtmlOne',path:'/teacher/stuWordHtmlOne/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'cutScreenDetails/:batchid/:examid',
        name: 'cutScreenDetails',
        props: true,
        component: () => import('@/components/exam/exam-analysis/cutScreenDetail.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'examAnalysis',path:'/teacher/examAnalysis/:batchid/:examid'},
            {name:'cutScreenDetails',path:'/teacher/cutScreenDetails/:batchid/:examid'},
          ]
        }
      },
      {
        path: 'questionTypeAnalysis/:batchid/:examid/:searchExamStruct',
        name: 'questionTypeAnalysis',
        props: true,
        component: () => import('@/components/exam/exam-analysis/questionTypeAnalysis.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'examAnalysis',path:'/teacher/examAnalysis/:batchid/:examid'},
            {name:'questionTypeAnalysis',path:'/teacher/questionTypeAnalysis/:batchid/:examid/:searchExamStruct'},
          ]
        }
      },
      {
        path: 'wrongStuList/:batchid/:examid/:searchExamStruct',
        name: 'wrongStuList',
        props: true,
        component: () => import('@/components/exam/exam-analysis/wrongStuList.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'examAnalysis',path:'/teacher/examAnalysis/:batchid/:examid'},
            {name:'wrongStuList',path:'/teacher/wrongStuList/:batchid/:examid/:searchExamStruct'},
          ]
        }
      },
      {
        path: 'approvaledList/:batchid/:examid',
        name: 'approvaledList',
        props: true,
        component: () => import('@/components/exam/exam-approval-list/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'approvaledList',path:'/teacher/approvaledList/:batchid/:examid'},
          ]
        }
      },
      {
        path: 'studentExamDetail2/:batchid/:examid/:stuid/:type',
        name: 'studentExamDetail2',
        props: true,
        component: () => import('@/components/exam/student-exam/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'approvaledList',path:'/teacher/approvaledList/:batchid/:examid'},
            {name:'studentExamDetail2',path:'/teacher/studentExamDetail2/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'stuWordHtml2/:batchid/:examid/:stuid/:type',
        name: 'stuWordHtml2',
        props: true,
        component: () => import('@/components/stuWordHtml/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'approvaledList',path:'/teacher/approvaledList/:batchid/:examid'},
            {name:'studentExamDetail2',path:'/teacher/studentExamDetail2/:batchid/:examid/:stuid/:type'},
            {name:'stuWordHtml2',path:'/teacher/stuWordHtml2/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'notApprovaledList/:batchid/:examid',
        name: 'notApprovaledList',
        props: true,
        component: () => import('@/components/exam/exam-approval-list/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'notApprovaledList',path:'/teacher/notApprovaledList/:batchid/:examid'},
          ]
        }
      },
      {
        path: 'studentExamDetail3/:batchid/:examid/:stuid/:type',
        name: 'studentExamDetail3',
        props: true,
        component: () => import('@/components/exam/student-exam/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'notApprovaledList',path:'/teacher/notApprovaledList/:batchid/:examid'},
            {name:'studentExamDetail3',path:'/teacher/studentExamDetail3/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'stuWordHtml3/:batchid/:examid/:stuid/:type',
        name: 'stuWordHtml3',
        props: true,
        component: () => import('@/components/stuWordHtml/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'notApprovaledList',path:'/teacher/notApprovaledList/:batchid/:examid'},
            {name:'studentExamDetail3',path:'/teacher/studentExamDetail3/:batchid/:examid/:stuid/:type'},
            {name:'stuWordHtml3',path:'/teacher/stuWordHtml3/:batchid/:examid/:stuid/:type'},
          ]
        },
      },
      {
        path: 'unsubmittedList/:batchid/:examid',
        name: 'unsubmittedList',
        props: true,
        component: () => import('@/components/exam/exam-approval-list/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'unsubmittedList',path:'/teacher/unsubmittedList/:batchid/:examid'},
          ]
        }
      },
      {
        path: 'stuCard/:batchid/:examType',
        name: 'stuCard',
        props: true,
        component: () => import('@/components/exam/stuCard-manage/index.vue'),
        meta:{
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'stuCard',path:'/teacher/stuCard/:batchid/:examType'},
          ]
        }
      },
      {
        path: 'stuTickets/:batchid/:examType/:num',
        name: 'stuTickets',
        props: true,
        component: () => import('@/components/exam/stu-tickets/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'examList',path:'/teacher/examList'},
            {name:'examManagement',path:'/teacher/examManagement/:batchid'},
            {name:'stuCard',path:'/teacher/stuCard/:batchid/:examType'},
            {name:'stuTickets',path:'/teacher/stuTickets/:batchid/:examType/:num'},
          ]
        },
      },
      {
        path: 'invigilateManagement',
        name: 'invigilateManagement',
        props: true,
        component: () => import('@/components/management/invigilateManagement/index.vue'),
        meta:{
          bread:[
            {name:'invigilateManagement',path:'/teacher/invigilateManagement'},
          ]
        }
      },
      {
        path: 'proctorManageOne/:examid/:paperType',
        name: 'proctorManageOne',
        props: true,
        component: () => import('@/components/exam/proctor-manage/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'invigilateManagement',path:'/teacher/invigilateManagement'},
            {name:'proctorManageOne',path:'/teacher/proctorManageOne/:examid/:paperType'},
          ]
        },
      },
      {
        path: 'examreportOne/:examid/:paperType',
        name: 'examreportOne',
        props: true,
        component: () => import('@/components/exam/exam-report/index.vue'),
        meta:{noMenu:true},
      },
      {
        path: 'approvalManagement',
        name: 'approvalManagement',
        props: true,
        component: () => import('@/components/approval/approval-manage/index.vue'),
        meta:{
          bread:[
            {name:'approvalManagement',path:'/teacher/approvalManagement'},
          ]
        }
      },
      {
        path: 'approvalPaper/:examid',
        name: 'approvalPaper',
        props: true,
        component: () => import('@/components/approval/approval-paper/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'approvalManagement',path:'/teacher/approvalManagement'},
            {name:'approvalPaper',path:'/teacher/approvalPaper/:examid'},
          ]
        },
      },
      {
        path: 'markedPaper/:examid',
        name: 'markedPaper',
        props: true,
        component: () => import('@/components/approval/marked-paper/index.vue'),
        meta:{
          noMenu:true,
          bread:[
            {name:'approvalManagement',path:'/teacher/approvalManagement'},
            {name:'markedPaper',path:'/teacher/markedPaper/:examid'},
          ]
        },
      },
      {
        path: 'ruleManage',
        name: 'ruleManage',
        props: true,
        component: () => import('@/components/exam/rule-manage/index.vue'),
        meta:{
          bread:[
            {name:'ruleManage',path:'/teacher/ruleManage'},
          ]
        }
      },
      {
        path: 'ruleEdit/:examid',
        name: 'ruleEdit',
        props: true,
        component: () => import('@/components/exam/rule-edit/index.vue'),
        meta:{
          bread:[
            {name:'ruleManage',path:'/teacher/ruleManage'},
            {name:'ruleEdit',path:'/teacher/ruleEdit/:examid'},
          ]
        },
      },
      {
        path: 'ruleAdd',
        name: 'ruleAdd',
        props: true,
        component: () => import('@/components/exam/rule-edit/index.vue'),
        meta:{
          bread:[
            {name:'ruleManage',path:'/teacher/ruleManage'},
            {name:'ruleAdd',path:'/teacher/ruleAdd'},
          ]
        },
      },
      {
        path: 'ruleLook/:examid',
        name: 'ruleLook',
        props: true,
        component: () => import('@/components/exam/rule-edit/look.vue'),
        meta:{
          bread:[
            {name:'ruleManage',path:'/teacher/ruleManage'},
            {name:'ruleLook',path:'/teacher/ruleLook/:examid'},
          ]
        },
      },
      {
        path: 'questionManagement',
        name: 'questionManagement',
        props: true,
        component: () => import('@/components/question-bank/manage/index.vue'),
        meta:{
          bread:[
            {name:'questionManagement',path:'/teacher/questionManagement'},
          ]
        }
      },
      {
        path: 'addQuestion/:addid',
        name: 'addQuestion',
        props: true,
        component: () => import('@/components/question-bank/add-question/index.vue'),
        meta:{
          bread:[
            {name:'questionManagement',path:'/teacher/questionManagement'},
            {name:'addQuestion',path:'/teacher/addQuestion/:addid'},
          ]
        }
      },
      {
        path: 'newQuestionOne/:addid/:quizid',
        name: 'editQuestion',
        props: true,
        component: () => import('@/components/question-bank/new-question1/index.vue'),
        meta:{
          bread:[
            {name:'questionManagement',path:'/teacher/questionManagement'},
            {name:'addQuestion',path:'/teacher/addQuestion/:addid'},
            {name:'editQuestion',path:'/teacher/newQuestionOne/:addid/:quizid'},
          ]
        }
      },
      {
        path: 'newQuestionOne/:addid',
        name: 'newQuestion',
        props: true,
        component: () => import('@/components/question-bank/new-question1/index.vue'),
        meta:{
          bread:[
            {name:'questionManagement',path:'/teacher/questionManagement'},
            {name:'addQuestion',path:'/teacher/addQuestion/:addid'},
            {name:'newQuestion',path:'/teacher/newQuestionOne/:addid'},
          ]
        }
      },
      {
        path: 'roleManagement',
        name: 'roleManagement',
        props: true,
        component: () => import('@/components/management/roleManagement/index.vue'),
        meta:{
          bread:[
            {name:'roleManagement',path:'/teacher/roleManagement'},
          ]
        }
      },
      {
        path: 'memManagement/:roleId',
        name: 'memManagement',
        props: true,
        component: () => import('@/components/management/memManagement/index.vue'),
        meta:{
          bread:[
            {name:'roleManagement',path:'/teacher/roleManagement'},
            {name:'memManagement',path:'/teacher/memManagement/:roleId'},
          ]
        }
      },
      {
        path: 'carteManagement/:roleId',
        name: 'carteManagement',
        props: true,
        component: () => import('@/components/management/carteManagement/index.vue'),
        meta:{
          bread:[
            {name:'roleManagement',path:'/teacher/roleManagement'},
            {name:'carteManagement',path:'/teacher/carteManagement/:roleId'},
          ]
        }
      },
      {
        path: 'menuRole',
        name: 'menuRole',
        props: true,
        component: () => import('@/components/management/menuRole/index.vue'),
        meta:{
          bread:[
            {name:'menuRole',path:'/teacher/menuRole'},
          ]
        }
      },
      // {
      //   path: 'menuRole',
      //   name: 'menuRole',
      //   props: true,
      //   component: () => import('@/components/management/menuRole/index.vue'),
      //   meta:{
      //     bread:[
      //       {name:'roleManagement',path:'/teacher/roleManagement'},
      //       {name:'menuRole',path:'/teacher/menuRole'},
      //     ]
      //   }
      // },
      {
        path: 'categoryManagement',
        name: 'categoryManagement',
        props: true,
        component: () => import('@/components/exam/category-management/index.vue'),
        meta:{
          bread:[
            {name:'categoryManagement',path:'/teacher/categoryManagement'},
          ]
        }
      },
      {
        path: 'examRoomManagement',
        name: 'examRoomManagement',
        props: true,
        component: () => import('@/components/exam/examRoom-management/index.vue'),
        meta:{
          bread:[
            {name:'examRoomManagement',path:'/teacher/examRoomManagement'},
          ]
        }
      },
      {
        path: 'recycleBin',
        name: 'recycleBin',
        props: true,
        component: () => import('@/components/question-bank/recycle-bin/index.vue'),
        meta:{
          bread:[
            {name:'recycleBin',path:'/teacher/recycleBin'},
          ]
        }
      },
      {
        path: 'studentManagement',
        name: 'studentManagement',
        props: true,
        component: () => import('@/components/basic-data/student-manage/index.vue'),
        meta:{
          bread:[
            {name:'studentManagement',path:'/teacher/studentManagement'},
          ]
        }
      },
      {
        path: 'facultyManagement',
        name: 'facultyManagement',
        props: true,
        component: () => import('@/components/basic-data/sub-manage/index.vue'),
        meta:{
          bread:[
            {name:'facultyManagement',path:'/teacher/facultyManagement'},
          ]
        }
      },
      {
        path: 'teacherManagement',
        name: 'teacherManagement',
        props: true,
        component: () => import('@/components/basic-data/teacher-manage/index.vue'),
        meta:{
          bread:[
            {name:'teacherManagement',path:'/teacher/teacherManagement'},
          ]
        }
      },
      {
        path: 'majorManagement',
        name: 'majorManagement',
        props: true,
        component: () => import('@/components/basic-data/major-manage/index.vue'),
        meta:{
          bread:[
            {name:'majorManagement',path:'/teacher/majorManagement'},
          ]
        }
      },
      {
        path: 'gradeManagement',
        name: 'gradeManagement',
        props: true,
        component: () => import('@/components/basic-data/grade-manage/index.vue'),
        meta:{
          bread:[
            {name:'gradeManagement',path:'/teacher/gradeManagement'},
          ]
        }
      },
      {
        path: 'classManagement',
        name: 'classManagement',
        props: true,
        component: () => import('@/components/basic-data/class-manage/index.vue'),
        meta:{
          bread:[
            {name:'classManagement',path:'/teacher/classManagement'},
          ]
        }
      },
      {
        path: 'schoolManagement',
        name: 'schoolManagement',
        props: true,
        component: () => import('@/components/basic-data/school-manage/index.vue'),
        meta:{
          bread:[
            {name:'schoolManagement',path:'/teacher/schoolManagement'},
          ]
        }
      },
      {
        path: 'todayExam',
        name: 'todayExam',
        props: true,
        component: () => import('@/components/statistics/today-exam/index.vue'),
        meta:{
          bread:[
            {name:'todayExam',path:'/teacher/todayExam'},
          ]
        }
      },
      {
        path: 'baseInfo',
        name: 'baseInfo',
        props: true,
        component: () => import('@/components/personaltion/base-info/index.vue'),
      },
      {
        path: 'updatePwd',
        name: 'updatePwd',
        props: true,
        component: () => import('@/components/personaltion/update-pwd/index.vue')
      },
    ]
  },
  // 学生
  {
    path: '/student',
    name: 'student',
    component: () => import('@/pages/students/stuMenu.vue'),
    redirect: { name: 'majorClass' },
    children: [
      {
        path: 'current',
        name: 'current',
        props: true,
        component: () => import('@/pages/students/major-exam/current.vue')
      },
      {
        path: 'aboutStart',
        name: 'aboutStart',
        props: true,
        component: () => import('@/pages/students/major-exam/aboutStart.vue')
      },
      {
        path: 'end',
        name: 'end',
        props: true,
        component: () => import('@/pages/students/major-exam/end.vue')
      },
      {
        path: 'stuTicket',
        name: 'stuTicket',
        props: true,
        component: () => import('@/pages/students/stu-ticket/index.vue')
      },
      {
        path: 'stuBaseInfo',
        name: 'stuBaseInfo',
        component: () => import('@/components/personaltion/base-info/index.vue')
      },
      {
        path: 'realName',
        name: 'realName',
        component: () => import('@/components/personaltion/real-name/index.vue')
      },
      {
        path: 'stuUpdatePwd',
        name: 'stuUpdatePwd',
        component: () => import('@/components/personaltion/update-pwd/index.vue')
      }
    ]
  },
  // 系统管理员
  {
    path: '/sysManager',
    name: 'sysManager',
    component: () => import('@/pages/sys-manager/sysMenu.vue'),
    redirect: { name: 'academicAdministrator' },
    children: [
      {
        path: 'academicAdministrator',
        name: 'academicAdministrator',
        props: true,
        component: () => import('@/pages/sys-manager/academicAdministrator/index.vue')
      },
      {
        path: 'schoolManagements',
        name: 'schoolManagement',
        props: true,
        component: () => import('@/pages/sys-manager/schoolManagement/index.vue')
      },
      {
        path: 'menuManagement',
        name: 'menuManagement',
        props: true,
        component: () => import('@/pages/sys-manager/menuManagement/index.vue')
      },
      {
        path: 'basicConfiguration',
        name: 'basicConfiguration',
        props: true,
        component: () => import('@/pages/sys-manager/basicConfiguration/index.vue')
      },
      {
        path: 'teachersManagement',
        name: 'teachersManagement',
        props: true,
        component: () => import('@/pages/sys-manager/teachersManagement/index.vue')
      },
      {
        path: 'studentsManagement',
        name: 'studentsManagement',
        props: true,
        component: () => import('@/pages/sys-manager/studentsManagement/index.vue')
      },
      {
        path: 'testStatistics',
        name: 'testStatistics',
        props: true,
        component: () => import('@/pages/sys-manager/testStatistics/index.vue')
      },
     
    ]
  },
  {
    path: '/student/majorClass',
    name: 'majorClass',
    props: true,
    component: () => import('@/pages/students/majorClass/index.vue')
  },
  {
    path: '/student/batchList',
    name: 'batchList',
    props: true,
    component: () => import('@/pages/students/batchList/index.vue')
  },
  {
    path: '/student/:Id/enterExam',
    name: 'enterExam',
    props: true,
    component: () => import('@/pages/students/enterExam/index.vue')
  },
  {
    path: '/stuCurrentExam/:Id',
    name: 'stuCurrentExam',
    props: true,
    component: () => import('@/pages/students/stuCurrentExam/index.vue')
  },
  {
    path: '/previewExam/:Id',
    name: 'previewExam',
    props: true,
    component: () => import('@/pages/students/previewExam/index.vue')
  },
  {
    path: '/ckeditor',
    name: 'ckeditor',
    props: true,
    component: () => import('@/components/editor-sl/index.vue')
  }
];

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
});

export default router;
